<!DOCTYPE html>
<html lang="en">
<head>
    <title>怪兽营</title>
    <meta charset="UTF-8"/>
    <meta name="author" content="zqtao|怪兽营">
    <meta name="email" content="zqtao23@163.com">
    <meta name="keywords" content="囧么肥事,怪兽营,怪兽,机器学习,python,Monster,Ubuntu20.04, Ubuntu安装Java环境配置环境变量"/>
    <meta name="description" content="怪兽营,快乐的咆哮怪兽, Ubuntu安装Java环境配置环境变量"/>
    <meta name="viewport"
          content="width=device-width,height=device-height,initial-scale=1.0,maximum-scale=1.0,user-scalable=0"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta http-equiv="Content-Type" content="text/html;"/>
    <meta name="renderer" content="webkit">
    <!--解决页面加载网络图片的403问题 , 可以让img标签预加载网络图片-->
    <meta name="referrer" content="no-referrer" />

    <!--markdown S -->
    <link rel="stylesheet" type="text/css" href="../../static/css/export_setting_css.css"/>
    <link rel="stylesheet" type="text/css" href="../../static/css/markdown_preview_css.css"/>
    <!--markdown E -->

    <!--left bar tools css E-->
    <link rel="stylesheet" type="text/css" href="../../static/css/nav.css">
    <link rel="stylesheet" type="text/css" href="http://www.jq22.com/jquery/font-awesome.4.6.0.css">
    <!--left bar tools css E-->

    <!-- 滚动条 S -->
    <link rel="stylesheet" href="../../static/css/optiscroll.css">
    <!-- 滚动条 E -->
</head>
<body>
<div id="m-wrapper" class="m-wrapper optiscroll">
    <!-- top 锚点 -->
    <a id="top"></a>

    <!-- left bar tools S -->
    <div class="leftNav-item">
        <ul>
            <li>
                <i class="fa fa-location-arrow"></i>
                <a href="http://jiongmefeishi.gitee.io/monster-blog/" target="_blank" class="rota">个人网站</a>
            </li>

            <li title="Git">
                <i class="fa fa-code-fork" aria-hidden="true"></i>
                <a href="http://jiongmefeishi.gitee.io/monster-blog/" target="_blank" class="rota">Git Page</a>
            </li>

            <li lay-data="img" data-fooc="http://resource.zqtaotao.cn/wx/qrcode/jiongmefeishi.jpg">
                <i class="fa fa-comments-o"></i><a href="javascript:;" class="rota">公众号</a>
            </li>

            <li lay-data="img" data-fooc="http://resource.zqtaotao.cn/weixincode.png">
                <i class="fa fa-money"></i><a href="javascript:;" class="rota">小额打赏</a>
            </li>
            <li title="返回顶部" class="for-top">
                <i class="fa fa-arrow-up"></i>
                <a href="#top" class="rota">去顶部</a>
            </li>
        </ul>
    </div>
    <!-- left bar tools E -->



    <!--content S-->

    <div id="export_content"><div class="output_wrapper" id="output_wrapper_id"><h3 id="hubuntujava"><span>Ubuntu 安装Java环境，配置环境变量</span></h3>
        <p>jdk官网下载地址</p>
        <pre><code class="hljs ruby"><span class="hljs-symbol">https:</span>/<span class="hljs-regexp">/www.oracle.com/technetwork</span><span class="hljs-regexp">/java/javase</span><span class="hljs-regexp">/downloads/jdk</span>8-downloads-<span class="hljs-number">2133151</span>.html<br></code></pre>
        <p>解压</p>
        <pre><code class="hljs coffeescript">tar&nbsp;-zxvf&nbsp;jdk<span class="hljs-number">-8</span>u191-linux-x64.tar.gz&nbsp;-C&nbsp;~<span class="hljs-regexp">/app/</span><br></code></pre>
        <p>添加环境变量</p>
        <pre><code class="hljs nginx"><span class="hljs-attribute">sudo</span>&nbsp;vim&nbsp;~/.bashrc<br></code></pre>
        <pre><code class="hljs bash"><span class="hljs-comment">#&nbsp;JAVA</span><br><br><span class="hljs-built_in">export</span>&nbsp;JAVA_HOME=/home/hadoop/app/jdk1.8.0_191<br><br><span class="hljs-built_in">export</span>&nbsp;PATH=<span class="hljs-variable">$JAVA_HOME</span>/bin:<span class="hljs-variable">$PATH</span><br></code></pre>
        <p>配置生效</p>
        <pre><code class="hljs bash"><span class="hljs-built_in">source</span>&nbsp;~/.bashrc<br></code></pre>
        <p>检查安装</p>
        <pre><code class="hljs nginx"><span class="hljs-comment">#&nbsp;依次验证&nbsp;java&nbsp;javac</span><br><span class="hljs-attribute">java</span><br><br>javac<br><br><span class="hljs-comment">#&nbsp;若想查看当前&nbsp;jdk版本</span><br>java&nbsp;-version<br></code></pre>
        <h3 id="hwindowjdk"><span><strong>window下安装jdk配置</strong></span></h3>
        <p>JAVA_HOME</p>
        <pre><code class="hljs css"><span class="hljs-selector-tag">C</span>:\<span class="hljs-selector-tag">Program</span>&nbsp;<span class="hljs-selector-tag">Files</span>\<span class="hljs-selector-tag">Java</span>\<span class="hljs-selector-tag">jdk1</span><span class="hljs-selector-class">.8</span><span class="hljs-selector-class">.0_192</span><br></code></pre>
        <p>CLASSPATH</p>
        <pre><code class="hljs perl">.;%JAVA_HOME%\lib;%JAVA_HOME%\lib\dt.jar;%JAVA_HOME%\tools.jar<br></code></pre>
        <p>Path  (window 7)</p>
        <pre><code class="hljs ini"><span class="hljs-comment">;%JAVA_HOME%\bin</span><br></code></pre>
        <p>验证环境变量配置</p>
        <p>Path (window 10)</p>
        <pre><code class="hljs perl">%JAVA_HOME%\bin<br></code></pre></div></div>

    <!--content E-->
</div>



</body>
<!--left bar tools js S-->
<script src="http://www.jq22.com/jquery/jquery-1.10.2.js"></script>
<script type="text/javascript" src="../../static/js/nav.js"></script>
<!--left bar tools js E-->

<!-- 滚动条 S -->
<script type="text/javascript" src="../../static/js/optiscroll.js"></script>
<!-- 滚动条 E -->

<!--commonjs S-->
<script type="text/javascript" src="../../static/js/common.js"></script>
<!--commonjs E-->

</html>
